From: Florian Müllner Date: Sat, 14 Mar 2020 15:15:45 +0000 (+0100) Subject: ci: Cache eslint results X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~684^2^2~447 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=9232cbf8a7654d84001e4016a7fc5ada2482bb4c;p=gnome-shell.git ci: Cache eslint results While this isn't useful during CI, it can provide a massive speed-up when used locally. https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1094 --- diff --git a/.gitlab-ci/run-eslint.sh b/.gitlab-ci/run-eslint.sh index accbbecb0..411c9d45b 100755 --- a/.gitlab-ci/run-eslint.sh +++ b/.gitlab-ci/run-eslint.sh @@ -18,12 +18,14 @@ run_eslint() { local extra_args=ARGS_$1 local output_var=OUTPUT_$1 local output=${!output_var} + local cache=.eslintcache-${1,,} # ensure output exists even if eslint doesn't report any errors mkdir -p $(dirname $output) touch $output - eslint -f unix ${!extra_args} -o $output js subprojects/extensions-app/js + eslint -f unix --cache --cache-location $cache ${!extra_args} -o $output \ + js subprojects/extensions-app/js } list_commit_range_additions() {